public class Student {
    public String name;
    public int age;
    public static String classes = "21java1班";//一个静态的班级
    public Student(){//这是一个构造方法
        System.out.println("不带参数的构造方法");
    }
    public Student(String name, int age) {//这是一个带两个参数的构造方法
        this.name = name;
        this.age = age;
    }
    public void setStudent(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void printStudent() {
        System.out.println(this.name + "->" + this.age + "->" + classes);
    }
    public static void main(String[] args) {

        Student student1 = new Student("zhangsan", 18);
        Student student2 = new Student("lisi", 19);
        Student student3 = new Student("wangwu", 20);
        Student student4 = new Student("zhaoliu", 21);
        //Student.classes = "21java1班";

        student1.printStudent();
        student2.printStudent();
        student3.printStudent();
        student4.printStudent();
    }
}